home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / textra16.lha / Textra116 / Scripts / JForth_Scripts / viewsel.textra < prev    next >
Encoding:
Text File  |  1993-08-19  |  610 b   |  32 lines

  1. /* display JForth source file & word */
  2.  
  3. OPTIONS results
  4.  
  5. rex = 0; result = "NOTSUPPORTED"
  6. textraversion
  7. parse var result maj min rex
  8. if (result == "NOTSUPPORTED") | (rex < 2) then do
  9.     notify "Textra V1.12 or later required for this script."
  10.     exit
  11. end
  12.  
  13. get select text
  14. parse var result numlines' 'theString
  15.  
  16. if numlines > 0 then do
  17.     notify "Select cannot extend past 1 line for VIEWSEL"
  18.     exit
  19. end
  20.  
  21. theString = UPPER(theString)
  22.  
  23. address 'JFORTH' '" 'theString'" ReturnFileName'
  24.  
  25. if (result ~= "NOT FOUND") then do
  26.     fname = result
  27.     if (fname ~= "RESULT") then do
  28.         openfile '"'fname'"'
  29.         find theString
  30.     end
  31. end
  32.